<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="/template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core">


    <ui:define name="title">
        <h:outputText value="#{bundle.ViewUserTitle}"></h:outputText>
    </ui:define>
    <ui:define name="body" >
        <h:form  id="form" styleClass="form" prependId="false">
            <p:fieldset legend="Fasta Information "  >
                <div class="icon_left">
                    <h:commandLink  action="/fasta/List" styleClass="menu_item" >
                            <h:graphicImage  value="../resources/images/syscon/fasta.png"   />
                            <br/>
                            <h:outputText  value="Fasta Control"/>
                    </h:commandLink>
                </div>
                <h:outputText value="#{fastaController.current.defline}" styleClass="engraved"/>
                <br/>
                <h:outputText value="ID:" styleClass="label"/>
                <h:outputText value="#{fastaController.current.fastaId}" title="#{bundle.ViewUserTitle_fastaId}"/>
                <p:spacer width="10"/>
                <h:outputText value="Def Line:" styleClass="label"/>
                <h:outputText value="#{fastaController.current.defline}" title="#{bundle.ViewUserTitle_fastaLogin}"/>
                <p:spacer width="10"/>
                <h:outputText value="Belongs to Project:" styleClass="label"/>
                <h:outputText value="#{fastaController.current.project}" title="#{bundle.ViewUserTitle_fastaEmail}"/>
                <p:spacer width="10"/>
                <h:outputText value="Created in:" styleClass="label"/>
                <h:outputText value="#{fastaController.current.creationDate}" title="#{bundle.ViewUserTitle_fastaCreation}">
                    <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                </h:outputText>
                <p:separator/>
                <p:inputTextarea  cols="80" rows="10" disabled="true" styleClass="fasta_edition"
                                  counterTemplate="{0} characters remaining." autoResize="false" value="#{fastaController.current.allSequence}">
                    <p:ajax event="keyup" update="counter"/>
                </p:inputTextarea>
                <br/>
                <h:outputLabel id="counter" value="#{fastaController.current.allSequence.length()}" styleClass="engraved"/>
                <br/>
                <c:if test="#{userController.allowedGroups('1,2')}">
                    <p:commandButton icon="ui-icon-pencil" ajax="false" action="#{fastaController.prepareEdit}" value="Edit"/>
                    <p:spacer width="10"/>
                    <p:commandButton icon="ui-icon-plus" ajax="false" action="#{fastaController.prepareCreate}" value="New" />
                    <p:spacer width="10"/>
                </c:if>
                <c:if test="#{userController.allowedGroups('1')}">
                    <p:commandButton icon="ui-icon-close" action="#{fastaController.destroy()}" value="Delete" />
                    <p:spacer width="10"/>
                </c:if>
            </p:fieldset>
            <br />
        </h:form>
    </ui:define>
</ui:composition>


